package edu.hawaii.duedates.datastore;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Stores all the information read in from the duedates.xml configuration file.
 *  
 * @author Daniel Arakaki, Arthur Shum, Daniel Tian, Jeho Jung
 * @version 1.0, November 25, 2008 
 */
public class DueDatesConfig implements Serializable {

  private static final long serialVersionUID = 1L;

  /** The SMTP server to use for sending email. */
  private String smtpServer;
  
  /** A list of authorized users. */
  private final List<User> users = new ArrayList<User>();
  
  /**
   * Returns the SMTP server.
   * 
   * @return the SMTP server.
   */
  public String getSmtpServer() {
    return smtpServer;
  }
  
  /**
   * Sets the SMTP server.
   * 
   * @param smtpServer the server to set the SMTP server to.
   */
  public void setSmtpServer(String smtpServer) {
    this.smtpServer = smtpServer;
  }
  
  /**
   * Returns the list of authorized users.
   * 
   * @return the list of authorized users.
   */
  public List<User> getUsers() {
    return users;
  }
  
  /**
   * Adds a user to the list of users.
   * 
   * @param user The user to add to the list of users.
   */
  public void addUser(User user) {
    this.users.add(user);
  }  
}
